package com.aabte.design.principle.dependenceinversion;

public class Test {

    public static void main(String[] args) {
        Student student = new Student();

        ICourse javaCourse = new JavaCourse();
        student.setCourse(javaCourse);
        student.studyCourse();

        ICourse pythonCourse = new PythonCourse();
        student.setCourse(pythonCourse);
        student.studyCourse();

        // Student在学习Java课程！
        // Student在学习Python课程！
    }

}
